clear; clc;

%% Setup

InputParam_0        =   struct('KAPPA',0.00/4,'XI',1/82.5/4,'Pir_SS',0.02/4,...
                                'TrProb_ext',0.99,'Prob_ext',0.33,...
                                'TrProb_H',0.99,'Prob_H',0.37,...
                                'Fin_DomShare',0.79,'Fin_AdjCost',1,...
                                'Cons_FracT',0.3253,'Cons_FracH',0.6,...
                                'B_Total_SS',0.95,'b_lb',-0.20,...
                                'O_AdjCostVec_FI',[5.43;4.47], ...
                                'O_AdjCostVec_RI',[5.24;4.51]);

[InputParam,PP,SS]  =   SubFun_SteadyState_OutputParam(InputParam_0);

save('Result_4_Benchmark.mat','InputParam','PP','SS');

%%
UnitNum             =   [SS.DistApp.fzo.UnitNum(1),PP.ExoState.IdioInc.N,...
                         PP.ExoState.Idio_FI.N,PP.ExoState.Idio_RI.N]';
AvgTrProbMat_FI     =   TrProbMat2AvgTrProbMat(SS.TrProb.UnitTrMat.ReEval,SS.Dist_fzo.QW_fzo,...
                                               UnitNum,[3]);
AvgTrProbMat_RI     =   TrProbMat2AvgTrProbMat(SS.TrProb.UnitTrMat.ReEval,SS.Dist_fzo.QW_fzo,...
                                               UnitNum,[4]);